package com.happe.foodeasy.service.impl;

import com.happe.foodeasy.dao.CustomerMapper;
import com.happe.foodeasy.normal.entity.CustomerEntity;
import com.happe.foodeasy.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl implements CustomerService {
    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public void saveOneCustomer(CustomerEntity customer) {
        customerMapper.save(customer);
    }

    @Override
    public boolean checkUserByName(String username) {
        return customerMapper.selectByUsername(username) == null;
    }
}
